<%= form_for(@answer) do |f| %>
  <% if @answer.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@answer.errors.count, "error") %> prohibited this answer from being saved:</h2>

      <ul>
      <% @answer.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :task %><br />
    <% options = Task.all(:order => "title").collect {|task| [task.title,task.id]} %>
    <%= select(:enrollment, :course_id , options, :prompt => ">> Choose <<") %>
  </div>
  <div class="field">
    <%= f.label :user %><br />
    <% options = User.find_all_by_type("Student", :order => "name").collect {|student| [student.name,student.id]} %>
    <%= select(:enrollment, :course_id , options, :prompt => ">> Choose <<") %>
  </div>
  <div class="field">
    <%= f.label :description %><br />
    <%= f.text_area :description %>
  </div>
  <div class="field">
    <%= f.label :delivered_at %><br />
    <%= f.date_select :delivered_at %>
  </div>
  <div class="field">
    <%= f.label :correction_value %><br />
    <%= f.text_field :correction_value %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
